package com.websuites.core.response;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;

import com.websuites.core.repository.Dict;

@SuppressWarnings("unchecked")
public interface IResult extends Serializable
{
	public void copy(IResult rs);
	public void clone(IResult rs);
	
	public void prepare(List listSpell);
	public void prepare(List listField, HashMap mapDicts);
	public void transfer(HashMap mapRow);
	public String getSubItem(String sDictItem, String sSubItem);
	
	public int getResType();
	public Object getResult();
	public List getResult(int nIndex);
	public HashMap getDict();
	
	public String getErrorCode();
	public String getErrorMessage();
	public String getReturnCode();
	public String getForwardCode();

	public int getFrom();
	public int getTo();

	public void setErrorCode(String sErrorCode);
	public void setErrorMessage(String sErrorMessage);
	public void setReturnCode(String sReturnCode);
	public void setForwardCode(String sForwardCode);
	
	public void failed(String sErrorMessage);
	public void successful(String sErrorMessage);
	public boolean isSuccessful();
	
	public void setResult(Object oResult);
	public void setResType(int iResType);
	public void setDict(Dict dict);
	
	public String getListXML();
	public StringBuffer getListJson();
	public int getListLen();
	public int getResultLen();
	
	public void sort(String sSortOrder, String sSortColumn);
	public void setPage(int iFrom, int iTo);
	public StringBuffer toXml();
	public StringBuffer toJson();
}
